<template>
  <div class="qualityteam-container">
    <!-- 顶部标题 -->
    <el-row justify="center" class="header-row">
      <el-col :span="24" class="title">一冷运营区域质量日报</el-col>
    </el-row>

    <!-- 原料质量情况 -->
    <el-row :gutter="16" class="main-tables">
      <el-col :span="24">
        <el-card shadow="hover" class="stat-card">
          <div class="card-title">原料质量情况</div>
          <el-table :data="mainTargetData" border size="small">
            <el-table-column prop="item1" label="单元" width="110" align="center" />
            <el-table-column prop="item2" label="类型" width="110" align="center" />
            <el-table-column label="当日（吨）" align="center" >
              <el-table-column prop="A1" label="板材炼钢" width="150" align="center" />
              <el-table-column prop="A2" label="板材热轧" width="150" align="center" />
              <el-table-column prop="A3" label="北营炼钢" width="150" align="center" />
              <el-table-column prop="A4" label="北营热轧" width="150" align="center" />
            </el-table-column>
            <el-table-column label="累计（吨）" align="center" >
              <el-table-column prop="B1" label="板材炼钢" width="150" align="center" />
              <el-table-column prop="B2" label="板材热轧" width="150" align="center" />
              <el-table-column prop="B3" label="北营炼钢" width="150" align="center" />
              <el-table-column prop="B4" label="北营热轧" width="150" align="center" />
            </el-table-column>
          </el-table>
        </el-card>
       
      
      </el-col>

    

    </el-row>

    <!-- 汽车板生产情况 -->
    <el-row :gutter="16" class="sub-tables">
      <el-col :span="12">
          <el-main style="height: 40vh">
          <div class="prodPie common-div-card">
            <div style="width: 100%; height: 100%">
              <graph-pie :data="profitData" :title="'外部当日降级'" />
            </div>
          </div>
        </el-main>
  
      </el-col>

    
      <el-col :span="12">
          <el-main style="height: 40vh">
          <div class="prodPie common-div-card">
            <div style="width: 100%; height: 100%">
              <graph-pie :data="profitData2" :title="'外部累计降级'" />
            </div>
          </div>
        </el-main>
      </el-col>
    </el-row>

  </div>
</template>

<script setup lang="ts">
  import { ref } from 'vue';
  import GraphPie from '../components/GraphPie.vue';

//主指标情况，表格数据
  const mainTargetData = [
    { item1: '酸轧',item2: '降级', A1: 100, A2: 110, A3: 120, A4: 130, B1: 210, B2: 220, B3: 230, B4: 240 },
    { item1: '酸轧',item2: '封闭返工', A1: 210, A2: 220, A3: 230, A4: 240,B1: 100, B2: 110, B3: 120, B4: 130 },
    { item1: '镀锌',item2: '降级', A1: 100, A2: 110, A3: 120, A4: 130, B1: 210, B2: 220, B3: 230, B4: 240 },
    { item1: '镀锌',item2: '封闭返工', A1: 210, A2: 220, A3: 230, A4: 240,B1: 100, B2: 110, B3: 120, B4: 130 },
    { item1: '超博',item2: '降级', A1: 100, A2: 110, A3: 120, A4: 130, B1: 210, B2: 220, B3: 230, B4: 240 },
    { item1: '超博',item2: '封闭返工', A1: 210, A2: 220, A3: 230, A4: 240,B1: 100, B2: 110, B3: 120, B4: 130 },
    { item1: '合计',item2: '降级', A1: 400, A2: 410, A3: 541, A4: 478, B1: 547, B2: 569, B3: 569, B4: 698 },
    { item1: '合计',item2: '封闭返工', A1: 741, A2: 582, A3: 325, A4: 456,B1: 654, B2: 987, B3: 789, B4: 895 },
  ];

  const profitData = ref<any>([
    { name: '板材炼钢', value: 30 },
    { name: '板材热轧', value: 40 },
    { name: '北营炼钢', value: 20 },
    { name: '北营热轧', value: 10 },
  ]);
  const profitData2 = ref<any>([
    { name: '板材炼钢', value: 784 },
    { name: '板材热轧', value: 478 },
    { name: '北营炼钢', value: 201 },
    { name: '北营热轧', value: 94 },
  ]);

  onBeforeMount(() => {});
</script>

<style lang="less" scoped>
  @border-radius: 8px;
  @primary-color: #2c69e8;
  @box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  @box-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
  @border:1px solid #dcdfe6;

  .common-div-card {
    box-shadow: @box-shadow;
    transition: 0.3s;
    border-radius: @border-radius;
    border: @border;

    // 悬停状态
    &:hover {
      box-shadow: @box-shadow-hover;
    }
  }

  .prodPie {
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
  }

  .qualityteam-container {
    padding: 18px 18px 0 18px;
    background: #f6f8fa;
  }
  .header-row .title {
    font-size: 2rem;
    font-weight: bold;
    color: #009966;
    letter-spacing: 0.5em;
    text-align: center;
    margin-bottom: 18px;
  }
  .card-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 8px;
  }
  .stat-card {
    margin-bottom: 16px;
  }
  .device-issue-row {
    margin-bottom: 16px;
  }
  .device-issue-card {
    background: #fffbe6;
  }
  .device-issue-content {
    color: #333;
    font-size: 0.98rem;
    line-height: 1.7;
    margin-top: 8px;
  }
  .bottom-card {
    margin-top: 18px;
  }
  .search-bar {
    margin-bottom: 0;
  }
  .center-panel {
  width: 33.33%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}
.center-row {
  width: 100%;
  height: 50%;
}
.card-bj{
  background-image: url('/src/assets/images/cut331.png');
  height: 26px;
  padding-top:5px;
  margin-bottom: 4px;
}
.tcm1-mid-mid-card2-graph {
    height: 25vh;
    width: 100%;
    margin-top: 1vh;
    box-shadow: @box-shadow;
    border-radius: @border-radius;
  }
</style>


